<template>
  <el-form-item label="是否开启合计行">
    <el-switch v-model="optionModel.isSubFormFooterRow" @change="handleIsSubFormFooterRowChange"></el-switch>
  </el-form-item>
  <el-form-item label="合计行名称" v-if="optionModel.isSubFormFooterRow">
    <el-input v-model="optionModel.subFormFooterRowTitle" placeholder="请输入合计行名称"></el-input>
  </el-form-item>
</template>

<script>
  import i18n from "@/utils/i18n"

  export default {
    name: "isSubFormFooterRow-editor",
    mixins: [i18n],
    props: {
      designer: Object,
      selectedWidget: Object,
      optionModel: Object,
    },
    methods: {
      handleIsSubFormFooterRowChange(val) {
        if (!val) {
          this.selectedWidget.widgetFooterList = [];
        }
      },
    }
  }
</script>

<style scoped>

</style>
